import requests

import lxml.etree as etree

url = "https://www.shicimingju.com/book/sanguoyanyi.html"

headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62"
}


res = requests.get(url, headers=headers)

print(res.content.decode())

tree = etree.HTML(res.content.decode())
# 抓取三国演绎章节
mulu = tree.xpath("//div[@class='list']/a")

for li in mulu:
    print("https://www.shicimingju.com" + li.xpath("./@href")[0])